package com.sengled.cloud.biz.union.mgt.service.sys;


import java.util.List;

import com.sengled.cloud.biz.union.mgt.model.dto.UnionUser;
import com.sengled.cloud.biz.union.mgt.model.po.Shop;
import com.sengled.cloud.biz.union.mgt.model.po.ShopAccount;
import com.sengled.cloud.biz.union.mgt.model.po.User;
import com.sengled.cloud.biz.union.mgt.model.request.SaveShopRequest;
import com.sengled.cloud.biz.union.mgt.model.request.SaveUserRequest;
import com.sengled.cloud.biz.union.mgt.model.request.UserListQueryRequest;
import com.sengled.cloud.biz.union.mgt.model.response.ResponseMessage;
import com.sengled.cloud.biz.union.mgt.model.vo.*;

import org.springframework.security.core.session.SessionRegistry;
import org.springframework.session.ExpiringSession;
import org.springframework.session.FindByIndexNameSessionRepository;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by FMC on 2017/10/27.
 */
public interface IUserService {

	ResponseMessage<List<UserVo>> listUsersByPage(UserListQueryRequest q);

	ResponseMessage saveOrUpdate(SaveUserRequest saveUserRequest,Long operatorId);

	ResponseMessage delete(Long id);

	ResponseMessage<UserDetailVo> getUserDetailById(Long id);

	ResponseMessage<List<SelectBoxDataVo>> getRoleSelectData(Long userId);

	ResponseMessage<ShopAccountListVo> getUserShops(Long accountId);

	ResponseMessage<CurrentShopsVo> changeShop(Long id,Long accountId,String moduleCode);

	ResponseMessage changePwd(Long accountId,String oldPwd,String newPwd);

	ResponseMessage saveFeedback(String feedback,Long accountId);

	ResponseMessage uploadUserProfile(MultipartFile profilePhoto, HttpServletRequest request ,String region ,String bucketName,Long accountId,String tempPath);

	ResponseMessage<CurrentUserVo> getCurrentUser(Long accountId,String storagePublicAddr,String storagePublicPort,String bucketName);

	ResponseMessage<List<SelectBoxDataVo>> getShopSelectData(Long userId);

	ResponseMessage<UserEditDetailVo> getUserEditDetailById(Long id);

	Long getCompanyId(Long userId);

    void invalidateSession(FindByIndexNameSessionRepository<ExpiringSession> sessionRepository, UnionUser user);

	ResponseMessage<GetCurrentShopVo> getCurrentShop(String channel,Long accountId);
}
